<template>
  <div class="video_list">
    <div class="author_box u-f u-f-ac">
      <van-image radius="30" lazy-load :src="data.creator.avatarUrl" />
      <p class="name van-ellipsis">{{ data.creator.nickname }}</p>
    </div>
    <div class="title">{{ data.title }}</div>
    <div class="video_box">
      <div class="video_box_content">
        <sky-video
          :url="data.urlInfo.url"
          :poster="data.coverUrl"
          :time="data.durationms"
        ></sky-video>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import SkyVideo from '@/components/common/sky-video.vue'

export default defineComponent({
  name: 'VideoList',
  props: {
    data: {
      type: Object,
      default: () => {
        return {}
      },
    },
  },
  components: {
    SkyVideo,
  },
})
</script>

<style lang="less" scoped>
.video_list {
  .author_box {
    height: 40px;
    padding: 0 16px;
    margin-bottom: 10px;
    .van-image {
      width: 35px;
      height: 35px;
      margin-right: 8px;
    }
    .name {
      width: 280px;
      font-size: 16px;
      color: var(--sky-text-black-color);
      font-weight: 700;
    }
  }
  .title {
    font-size: 16px;
    color: var(--sky-text-black-color);
    text-indent: 20px;
    padding: 0 16px;
    margin-bottom: 10px;
  }
  .video_box {
    padding: 0 16px 16px;
    .video_box_content {
      width: 100%;
      height: 193px;
      border-radius: 10px;
    }
  }
}
</style>